
#include "setting_page2.h"
#include "sys_font.h"
#include "pt_fs.h"
#include "root.h"
#include "ui_base_page.h"
#include "setting_reboot.h"
#include "setting_update.h"

static  ui_widget2_setting_t  ui_set2_p;

static  char * icon2_point[2] =
{
    "Dot_Default.png",
    "Dot_Selected.png",
};

static  char * icon_reboot[1] =
{
    "Restart_Default.png",
};

static  char * icon_update[1] =
{
    "FirmwareUpdate_Default.png",
};

static  char * icon_config[1] =
{
    "RedistributingNetwork_Default.png",
};

static  char * icon_unbind[1] =
{
    "Unbind_Default.png",
};

static  char * icon_legal[1] =
{
    "LegalInfo_Default.png",
};


static int setting_reboot_event(void)
{
    root_gesture_disable();
    page_install("setting_reboot", lv_page_setting_reboot_create(),NULL);
    page_push_anim("setting_reboot",LOAD_ANIM_MOVE_LEFT);

    return 0;
}

static void setting_reboot_event_callback(lv_event_t* event)
{
    if (event->code == LV_EVENT_CLICKED) {

        debug_d("reboot clicked\n");
        setting_reboot_event();
    }
}

static int setting_update_clicked_event(void)
{
    root_gesture_disable();
    // if(pt_update_get())
    if(1)
    {
        page_install("setting_update", lv_page_setting_update_create(),NULL);
        page_push_anim("setting_update",LOAD_ANIM_MOVE_LEFT);
    }
    else
    {
        
        page_install("setting_up", lv_page_setting_up_new_create(),NULL);
        page_push_anim("setting_up",LOAD_ANIM_MOVE_LEFT);
    }

    return 0;
}

static void setting_update_event_callback(lv_event_t* event)
{
    if (event->code == LV_EVENT_CLICKED) {

        debug_d("update clicked\n");
        setting_update_clicked_event();
    }
}

static int setting_config_clicked_event(void)
{

    root_gesture_disable();
    page_install("setting_restore", lv_page_setting_restore_create(),NULL);
    page_push_anim("setting_restore",LOAD_ANIM_MOVE_LEFT);

    return 0;
}

static void setting_config_event_callback(lv_event_t* event)
{
    if (event->code == LV_EVENT_CLICKED) {

        debug_d("config clicked\n");

        setting_config_clicked_event();
    }
}

static int setting_unbind_clicked_event(void)
{
    root_gesture_disable();
    page_install("setting_unbind", lv_page_setting_unbind_create(),NULL);
    page_push_anim("setting_unbind",LOAD_ANIM_MOVE_LEFT);

    return 0;
}

static void setting_unbind_event_callback(lv_event_t* event)
{
    if (event->code == LV_EVENT_CLICKED) {

        debug_d("unbind clicked\n");
        setting_unbind_clicked_event();
    }
}

static int setting_legal_clicked_event(void)
{
    root_gesture_disable();
    page_install("setting_legal", lv_page_setting_legal_create(),NULL);
    page_push_anim("setting_legal",LOAD_ANIM_MOVE_LEFT);

    return 0;
}

static void setting_legal_event_callback(lv_event_t* event)
{
    if (event->code == LV_EVENT_CLICKED) {

        debug_d("legal clicked\n");
        setting_legal_clicked_event();
    }
}

void ui_setting_page2_create(lv_obj_t* parent,void* ui_data)
{
    lv_obj_t *superview = parent;
    char txt_buff[24];

    ui_set2_p.is_update = 0;

    lv_coord_t pw = 0;
    lv_coord_t ph = 0;

    pw = lv_disp_get_hor_res(NULL);
    ph = lv_disp_get_ver_res(NULL);
    //**************************************************************************************
    ui_set2_p.bg  = lv_obj_create(superview);

    lv_obj_set_style_radius(ui_set2_p.bg, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg, 0, LV_PART_MAIN);
    lv_obj_set_style_border_opa(ui_set2_p.bg, LV_OPA_0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
    lv_obj_set_style_pad_all(ui_set2_p.bg,0,0);

    #if 0
	lv_obj_set_style_bg_opa(ui_set2_p.bg, LV_OPA_0, LV_PART_MAIN);
    #else
	lv_obj_set_style_bg_opa(ui_set2_p.bg, LV_OPA_100, LV_PART_MAIN);
	lv_obj_set_style_bg_color(ui_set2_p.bg, lv_color_make(0,0,0), LV_PART_MAIN);
    #endif

	lv_obj_set_pos(ui_set2_p.bg,0,0);
	lv_obj_set_size(ui_set2_p.bg,pw,ph);
    //****************************************************** */

    //****************************************************** */
    ui_set2_p.img_point1 = lv_img_create(ui_set2_p.bg);
    lv_img_set_src(ui_set2_p.img_point1,pt_fs_get(icon2_point[0]));
    lv_obj_set_pos(ui_set2_p.img_point1,221,19);

    ui_set2_p.img_point2 = lv_img_create(ui_set2_p.bg);
    lv_img_set_src(ui_set2_p.img_point2,pt_fs_get(icon2_point[1]));
    lv_obj_set_pos(ui_set2_p.img_point2,235,19);

    //**************************************************************************************
    //bg_reboot status

    ui_set2_p.bg_reboot = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.bg_reboot,25,60);
    lv_obj_set_size(ui_set2_p.bg_reboot,70,70);

	lv_obj_set_style_radius(ui_set2_p.bg_reboot, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg_reboot, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg_reboot, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.bg_reboot, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.bg_reboot, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.bg_reboot, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.bg_reboot, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.bg_reboot, 0,0);


    #if 1
    lv_obj_set_style_bg_opa(ui_set2_p.bg_reboot,LV_OPA_0,0);
    #else
    lv_obj_set_style_bg_opa(ui_set2_p.bg_reboot,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.bg_reboot,lv_color_make(0xff,0,0),0);
    #endif

    lv_obj_add_event_cb(ui_set2_p.bg_reboot, setting_reboot_event_callback, LV_EVENT_ALL, NULL);

    ui_set2_p.img_reboot = lv_img_create(ui_set2_p.bg_reboot);
    lv_img_set_src(ui_set2_p.img_reboot,pt_fs_get(icon_reboot[0]));
    lv_obj_set_pos(ui_set2_p.img_reboot,0,0);
    //**************************************************************************************
    //update status

    ui_set2_p.bg_update = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.bg_update,137,60);
    lv_obj_set_size(ui_set2_p.bg_update,70,70);

	lv_obj_set_style_radius(ui_set2_p.bg_update, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg_update, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg_update, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.bg_update, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.bg_update, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.bg_update, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.bg_update, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.bg_update, 0,0);


    #if 1
    lv_obj_set_style_bg_opa(ui_set2_p.bg_update,LV_OPA_0,0);
    #else
    lv_obj_set_style_bg_opa(ui_set2_p.bg_update,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.bg_update,lv_color_make(0xff,0,0),0);
    #endif

    lv_obj_add_event_cb(ui_set2_p.bg_update, setting_update_event_callback, LV_EVENT_ALL, NULL);

    ui_set2_p.img_update = lv_img_create(ui_set2_p.bg_update);
    lv_img_set_src(ui_set2_p.img_update,pt_fs_get(icon_update[0]));
    lv_obj_set_pos(ui_set2_p.img_update,0,0);

    //******************************************
    ui_set2_p.tip_update = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.tip_update,196,60);
    lv_obj_set_size(ui_set2_p.tip_update,10,10);

	lv_obj_set_style_radius(ui_set2_p.tip_update, 10, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.tip_update, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.tip_update, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.tip_update, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.tip_update, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.tip_update, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.tip_update, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.tip_update, 0,0);

    lv_obj_set_style_bg_opa(ui_set2_p.tip_update,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.tip_update,lv_color_make(0xff,0x3b,0x30),0);

    // if(pt_update_get())
    if(1)
    {
        if(ui_set2_p.tip_update && lv_obj_has_flag(ui_set2_p.tip_update,LV_OBJ_FLAG_HIDDEN)){
            lv_obj_clear_flag(ui_set2_p.tip_update,LV_OBJ_FLAG_HIDDEN);
        }
    }
    else{
        if(ui_set2_p.tip_update){
            lv_obj_add_flag(ui_set2_p.tip_update,LV_OBJ_FLAG_HIDDEN);
        }
    }
    //**************************************************************************************
    //config status

    ui_set2_p.bg_config = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.bg_config,246,60);
    lv_obj_set_size(ui_set2_p.bg_config,70,70);

	lv_obj_set_style_radius(ui_set2_p.bg_config, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg_config, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg_config, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.bg_config, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.bg_config, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.bg_config, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.bg_config, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.bg_config, 0,0);

    #if 1
    lv_obj_set_style_bg_opa(ui_set2_p.bg_config,LV_OPA_0,0);
    #else
    lv_obj_set_style_bg_opa(ui_set2_p.bg_config,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.bg_config,lv_color_make(0xff,0,0),0);
    #endif

    lv_obj_add_event_cb(ui_set2_p.bg_config, setting_config_event_callback, LV_EVENT_ALL, NULL);

    ui_set2_p.img_config = lv_img_create(ui_set2_p.bg_config);
    lv_img_set_src(ui_set2_p.img_config,pt_fs_get(icon_config[0]));
    lv_obj_set_pos(ui_set2_p.img_config,0,0);
    //**************************************************************************************
    //unbind status

    ui_set2_p.bg_unbind = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.bg_unbind,357,60);
    lv_obj_set_size(ui_set2_p.bg_unbind,70,70);

	lv_obj_set_style_radius(ui_set2_p.bg_unbind, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg_unbind, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg_unbind, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.bg_unbind, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.bg_unbind, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.bg_unbind, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.bg_unbind, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.bg_unbind, 0,0);

    #if 1
    lv_obj_set_style_bg_opa(ui_set2_p.bg_unbind,LV_OPA_0,0);
    #else
    lv_obj_set_style_bg_opa(ui_set2_p.bg_unbind,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.bg_unbind,lv_color_make(0xff,0,0),0);
    #endif

    lv_obj_add_event_cb(ui_set2_p.bg_unbind, setting_unbind_event_callback, LV_EVENT_ALL, NULL);

    ui_set2_p.img_unbind = lv_img_create(ui_set2_p.bg_unbind);
    lv_img_set_src(ui_set2_p.img_unbind,pt_fs_get(icon_unbind[0]));
    lv_obj_set_pos(ui_set2_p.img_unbind,0,0);
    //**************************************************************************************
    //legal status

    ui_set2_p.bg_legal = lv_obj_create(superview);

    lv_obj_set_pos(ui_set2_p.bg_legal,25,190);
    lv_obj_set_size(ui_set2_p.bg_legal,70,70);

	lv_obj_set_style_radius(ui_set2_p.bg_legal, 0, LV_PART_MAIN);
	lv_obj_set_style_border_width(ui_set2_p.bg_legal, 0, LV_PART_MAIN);
	lv_obj_set_style_border_color(ui_set2_p.bg_legal, lv_color_make(0x00, 0x00, 0x00), LV_PART_MAIN);
	lv_obj_set_style_border_opa(ui_set2_p.bg_legal, LV_OPA_0, LV_PART_MAIN);

	lv_obj_set_style_outline_width(ui_set2_p.bg_legal, 0, LV_PART_MAIN);
	lv_obj_set_style_shadow_width(ui_set2_p.bg_legal, 0, LV_PART_MAIN);
	lv_obj_set_scrollbar_mode(ui_set2_p.bg_legal, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_pad_all(ui_set2_p.bg_legal, 0,0);

    #if 1
    lv_obj_set_style_bg_opa(ui_set2_p.bg_legal,LV_OPA_0,0);
    #else
    lv_obj_set_style_bg_opa(ui_set2_p.bg_legal,LV_OPA_100,0);
    lv_obj_set_style_bg_color(ui_set2_p.bg_legal,lv_color_make(0xff,0,0),0);
    #endif

    lv_obj_add_event_cb(ui_set2_p.bg_legal, setting_legal_event_callback, LV_EVENT_ALL, NULL);

    ui_set2_p.img_legal = lv_img_create(ui_set2_p.bg_legal);
    lv_img_set_src(ui_set2_p.img_legal,pt_fs_get(icon_legal[0]));
    lv_obj_set_pos(ui_set2_p.img_legal,0,0);
    //**************************************************************************************
    //icon name

    ui_set2_p.lab_reboot = lv_label_create(superview);
    lv_obj_set_pos(ui_set2_p.lab_reboot,20,140);
    lv_obj_set_size(ui_set2_p.lab_reboot,80,22);
    lv_obj_set_style_text_align(ui_set2_p.lab_reboot,LV_TEXT_ALIGN_CENTER,0);
    lv_obj_set_style_text_opa(ui_set2_p.lab_reboot,LV_OPA_60,0);
    lv_obj_set_style_text_color(ui_set2_p.lab_reboot,lv_color_make(0xff,0xff,0xff),0);
    lv_obj_set_style_text_font(ui_set2_p.lab_reboot, lv_font_get(18), LV_STATE_DEFAULT);
    lv_label_set_text( ui_set2_p.lab_reboot, "重启");

    ui_set2_p.lab_update = lv_label_create(superview);
    lv_obj_set_pos(ui_set2_p.lab_update,131,140);
    lv_obj_set_size(ui_set2_p.lab_update,80,22);
    lv_obj_set_style_text_align(ui_set2_p.lab_update,LV_TEXT_ALIGN_CENTER,0);
    lv_obj_set_style_text_opa(ui_set2_p.lab_update,LV_OPA_60,0);
    lv_obj_set_style_text_color(ui_set2_p.lab_update,lv_color_make(0xff,0xff,0xff),0);
    lv_obj_set_style_text_font(ui_set2_p.lab_update, lv_font_get(18), LV_STATE_DEFAULT);
    lv_label_set_text( ui_set2_p.lab_update, "固件更新");

    ui_set2_p.lab_config = lv_label_create(superview);
    lv_obj_set_pos(ui_set2_p.lab_config,241,140);
    lv_obj_set_size(ui_set2_p.lab_config,80,22);
    lv_obj_set_style_text_align(ui_set2_p.lab_config,LV_TEXT_ALIGN_CENTER,0);
    lv_obj_set_style_text_opa(ui_set2_p.lab_config,LV_OPA_60,0);
    lv_obj_set_style_text_color(ui_set2_p.lab_config,lv_color_make(0xff,0xff,0xff),0);
    lv_obj_set_style_text_font(ui_set2_p.lab_config, lv_font_get(18), LV_STATE_DEFAULT);
    lv_label_set_text( ui_set2_p.lab_config, "重新配网");

    ui_set2_p.lab_unbind = lv_label_create(superview);
    lv_obj_set_pos(ui_set2_p.lab_unbind,362,140);
    lv_obj_set_size(ui_set2_p.lab_unbind,60,22);
    lv_obj_set_style_text_align(ui_set2_p.lab_unbind,LV_TEXT_ALIGN_CENTER,0);
    lv_obj_set_style_text_opa(ui_set2_p.lab_unbind,LV_OPA_60,0);
    lv_obj_set_style_text_color(ui_set2_p.lab_unbind,lv_color_make(0xff,0xff,0xff),0);
    lv_obj_set_style_text_font(ui_set2_p.lab_unbind, lv_font_get(18), LV_STATE_DEFAULT);
    lv_label_set_text( ui_set2_p.lab_unbind, "解绑");

    ui_set2_p.lab_legal = lv_label_create(superview);
    lv_obj_set_pos(ui_set2_p.lab_legal,20,270);
    lv_obj_set_size(ui_set2_p.lab_legal,80,22);
    lv_obj_set_style_text_align(ui_set2_p.lab_legal,LV_TEXT_ALIGN_CENTER,0);
    lv_obj_set_style_text_opa(ui_set2_p.lab_legal,LV_OPA_60,0);
    lv_obj_set_style_text_color(ui_set2_p.lab_legal,lv_color_make(0xff,0xff,0xff),0);
    lv_obj_set_style_text_font(ui_set2_p.lab_legal, lv_font_get(18), LV_STATE_DEFAULT);
    lv_label_set_text( ui_set2_p.lab_legal, "法律信息");
    //*************************************************************************************



    return ;
}


void ui_setting_page2_destroy(void* ui_data)
{
    ui_set2_p.is_update = 0;

    if(!ui_set2_p.bg){
        return;
    }

    if(ui_set2_p.bg){
        lv_obj_del(ui_set2_p.bg);
        ui_set2_p.bg = NULL;
        ui_set2_p.img_point1 = NULL;
        ui_set2_p.img_point2 = NULL;
    }
    if(ui_set2_p.bg_reboot){
        lv_obj_del(ui_set2_p.bg_reboot);
        ui_set2_p.bg_reboot = NULL;
        ui_set2_p.img_reboot = NULL;
    }
    if(ui_set2_p.bg_update){
        lv_obj_del(ui_set2_p.bg_update);
        ui_set2_p.bg_update = NULL;
        ui_set2_p.img_update = NULL;
    }
    if(ui_set2_p.tip_update){
        lv_obj_del(ui_set2_p.tip_update);
        ui_set2_p.tip_update = NULL;

    }
    if(ui_set2_p.bg_config){
        lv_obj_del(ui_set2_p.bg_config);
        ui_set2_p.bg_config = NULL;
        ui_set2_p.img_config = NULL;
    }
    if(ui_set2_p.bg_unbind){
        lv_obj_del(ui_set2_p.bg_unbind);
        ui_set2_p.bg_unbind = NULL;
        ui_set2_p.img_unbind = NULL;
    }
    if(ui_set2_p.bg_legal){
        lv_obj_del(ui_set2_p.bg_legal);
        ui_set2_p.bg_legal = NULL;
        ui_set2_p.img_legal = NULL;
    }
    if(ui_set2_p.lab_reboot){
        lv_obj_del(ui_set2_p.lab_reboot);
        ui_set2_p.lab_reboot = NULL;
    }
    if(ui_set2_p.lab_update){
        lv_obj_del(ui_set2_p.lab_update);
        ui_set2_p.lab_update = NULL;
    }
    if(ui_set2_p.lab_config){
        lv_obj_del(ui_set2_p.lab_config);
        ui_set2_p.lab_config = NULL;
    }
    if(ui_set2_p.lab_unbind){
        lv_obj_del(ui_set2_p.lab_unbind);
        ui_set2_p.lab_unbind = NULL;
    }
    if(ui_set2_p.lab_legal){
        lv_obj_del(ui_set2_p.lab_legal);
        ui_set2_p.lab_legal = NULL;
    }

    return ;
}

static void setting_page2_on_view_did_load(page_base_t* self)
{}
static void setting_page2_on_view_did_unload(page_base_t* self)
{}
static setting_page2_on_custom_attr_config(page_base_t* self)
{}
static setting_page2_on_view_load(page_base_t* self)
{}
static setting_page2_on_view_will_appear(page_base_t* self)
{}
static setting_page2_on_view_did_appear(page_base_t* self)
{}
static setting_page2_on_view_will_disappear(page_base_t* self)
{}
static setting_page2_on_view_did_disappear(page_base_t* self)
{}
static page_vtable_t setting_page2_param = {
    .on_custom_attr_config  = setting_page2_on_custom_attr_config,
    .on_view_load           = setting_page2_on_view_load,
    .on_view_did_load       = setting_page2_on_view_did_load,
    .on_view_will_appear    = setting_page2_on_view_will_appear,
    .on_view_did_appear     = setting_page2_on_view_did_appear,
    .on_view_will_disappear = setting_page2_on_view_will_disappear,
    .on_view_did_disappear  = setting_page2_on_view_did_disappear,
    .on_view_did_unload     = setting_page2_on_view_did_unload,
};

page_vtable_t* lv_page_setting2_create(void)
{
    return &setting_page2_param;
}

static void settting2_on_page_create(lv_obj_t* parent,void* ui_data)
{
    debug_d("create\n");
    ui_setting_page2_create(parent,ui_data);
}
static void settting2_on_page_destroy(void* ui_data)
{
    debug_d("destroy\n");
    ui_setting_page2_destroy(ui_data);
}
static void settting2_on_page_update(void* ui_data)
{

}
static page_method_t page_settting2 = {
    .on_page_create  = settting2_on_page_create,
    .on_page_destroy = settting2_on_page_destroy,
    .on_page_update  = settting2_on_page_update,
};

page_method_t* lv_settting2_page_method(void)
{
    return &page_settting2;
}